﻿@{
    Layout = null;
}
<script type="text/javascript" charset="utf-8">
    var lockWindowFun = function () {
        $.post(sy.contextPath + '/base/syuser!doNotNeedSessionAndSecurity_logout.sy', function (result) {
            $('#loginDialog').dialog('open');
        }, 'json');
    };
    var logoutFun = function () {
        $.post(sy.contextPath + '/base/syuser!doNotNeedSessionAndSecurity_logout.sy', function (result) {
            location.replace(sy.contextPath + '/index.jsp');
        }, 'json');
    };
    var showMyInfoFun = function () {
        var dialog = parent.sy.modalDialog({
            title: '我的信息',
            url: sy.contextPath + '/securityJsp/userInfo.jsp'
        });
    };
</script>
<div id="sessionInfoDiv" style="position: absolute; right: 10px; top: 5px;">
    欢迎您，<b>@ViewBag.LoginName</b>，当前时间：@CommonHelper.Now.ToString("yyyy-MM-dd hh:mm")
</div>
<div style="position: absolute; right: 0px; bottom: 0px;">
    <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-box'" plain="true" id="btnMessage" msnurl="@ViewBag.MessageToken">消息 </a>
    <a href="javascript:void(0);" class="easyui-menubutton" data-options="menu:'#layout_north_pfMenu',iconCls:'ext-icon-rainbow'">更换皮肤</a>
    <a href="javascript:void(0);" class="easyui-menubutton" data-options="menu:'#layout_north_kzmbMenu',iconCls:'ext-icon-cog'">控制面板</a>
    <a href="javascript:void(0);" class="easyui-menubutton" data-options="menu:'#layout_north_zxMenu',iconCls:'ext-icon-disconnect'">注销</a>
</div>
<div id="layout_north_pfMenu" style="width: 120px; display: none;">
    <div onclick="sy.changeTheme('default');" title="default">default</div>
    <div onclick="sy.changeTheme('gray');" title="gray">gray</div>
    <div onclick="sy.changeTheme('metro');" title="metro">metro</div>
    <div onclick="sy.changeTheme('bootstrap');" title="bootstrap">bootstrap</div>
    <div onclick="sy.changeTheme('black');" title="black">black</div>
    <div class="menu-sep"></div>
    <div onclick="sy.changeTheme('metro-blue');" title="metro-blue">metro-blue</div>
    <div onclick="sy.changeTheme('metro-gray');" title="metro-gray">metro-gray</div>
    <div onclick="sy.changeTheme('metro-green');" title="metro-green">metro-green</div>
    <div onclick="sy.changeTheme('metro-orange');" title="metro-orange">metro-orange</div>
    <div onclick="sy.changeTheme('metro-red');" title="metro-red">metro-red</div>
</div>
<div id="layout_north_kzmbMenu" style="width: 100px; display: none;">
    <div data-options="iconCls:'ext-icon-user_edit'" onclick="editPwd();">修改密码</div>
    @*<div class="menu-sep"></div>
    <div data-options="iconCls:'ext-icon-user'" onclick="showMyInfoFun();">我的信息</div>*@
</div>
<div id="layout_north_zxMenu" style="width: 100px; display: none;">
    @*<div data-options="iconCls:'ext-icon-lock'" onclick="lockWindowFun();">锁定窗口</div>
    <div class="menu-sep"></div>*@
    <div data-options="iconCls:'ext-icon-door_out'"><a href="/home/loginout">退出系统</a></div>
</div>
<!---修改密码 弹框-->
<form id="frmUpdateStaffPwd_Dialog" method="post" style="display:none;">
    <input type="hidden" name="StaffId" value="@ViewBag.UserId" />
   
    <table class="table tableCls" style="width: 100%;border:none;">
        <tr>
            <td width="80" class="right"><label class="red-font">*</label>登录名：</td>
            <td>
                <input type="text" name="LoginName" class="easyui-validatebox" data-options="required:true" disabled="disabled" value="@ViewBag.LoginName" />
            </td>
        </tr>
        <tr>
            <td class="right"><label class="red-font">*</label>原密码：</td>
            <td>
                <input type="password" name="OldPassword" class="easyui-validatebox" data-options="required:true" />
            </td>
        </tr>
        <tr>
            <td class="right"><label class="red-font">*</label>新密码：</td>
            <td>
                <input type="password" name="Password" class="easyui-validatebox" data-options="required:true" />
            </td>
        </tr>
        <tr>
            <td class="right"><label class="red-font">*</label>确认密码：</td>
            <td>
                <input type="password" name="PasswordValid" class="easyui-validatebox" data-options="required:true" />
            </td>
        </tr>
    </table>
</form>

<script type="text/javascript">
    //修改密码
    function editPwd() {
        var dialog;
        var buttons = easymvc.getDefaultButtons({
            callback: function () {
                easymvc.submit({
                    dialog: dialog, form: "frmUpdateStaffPwd_Dialog", url: "/api/BoAccount/UpdatePwd", grid: '', callback: function (response) { }
                });
            }
        });
        dialog = easymvc.dialog({ form: 'frmUpdateStaffPwd_Dialog', title: '修改密码', width: '400', height: 'auto', buttons: buttons, grid: '' });
    }

    $(function () {
        $('#btnMessage').click(function () {
            //$('#dlgMessages').window('open');
            //$('#layMessage').layout();
            easymvc.openUrl($(this).attr("msnurl"), false);
        });
    });
</script>
